raar.world
Class RAWorldObject

java.lang.Object
  extended by vectorimage.VectorObject
      extended by raar.world.RAWorldObject
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
RAWorldObjectMovable

public class RAWorldObject
extends VectorObject

Version 1.2 adds support for vector based worlds. This class defines the objects that can be placed in such worlds.

Author:
Steven de Jong
See Also:
Serialized Form

Field Summary
static int SOBJ_AGENT
          Subclass object agent.
static int SOBJ_TRACE
          Subclass object trace.
 
Fields inherited from class vectorimage.VectorObject
OBJ_ELLIPSE, OBJ_LINE, OBJ_RECTANGLE
 
Constructor Summary
RAWorldObject(java.lang.String className, java.lang.String name, int type, java.awt.geom.Rectangle2D.Double bounds, double rotation, java.awt.Color color, boolean isStatic, boolean fixed, boolean massive, boolean movable, boolean light, double delay)
          Construct the shape.
 
Method Summary
 GVectorObject createGVectorObject()
          Create a GVectorObject.
 boolean emitsLight()
          Return whether the object emits light.
 java.lang.String getClassName()
          Return the object's class name.
 java.lang.String getName()
          Return the object's name.
 boolean isFixed()
          Return whether the object is fixed.
 boolean isLight()
          Return whether the object is a lightsource.
 boolean isMassive()
          Return whether the object is massive.
 boolean isMovable()
          Return whether the object is movable.
 boolean isStatic()
          Return whether the object is static.
 void moveBy(double dx, double dy)
          Move the object by dx and dy, iff it is movable.
 
Methods inherited from class vectorimage.VectorObject
contains, getBounds, getColor, getPosition, getRotation, getType, isFilled, setBounds, setPosition, setRotation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

SOBJ_AGENT

public static final int SOBJ_AGENT
Subclass object agent.

See Also:
Constant Field Values

SOBJ_TRACE

public static final int SOBJ_TRACE
Subclass object trace.

See Also:
Constant Field Values
Constructor Detail

RAWorldObject

public RAWorldObject(java.lang.String className,
                     java.lang.String name,
                     int type,
                     java.awt.geom.Rectangle2D.Double bounds,
                     double rotation,
                     java.awt.Color color,
                     boolean isStatic,
                     boolean fixed,
                     boolean massive,
                     boolean movable,
                     boolean light,
                     double delay)
Construct the shape.

Method Detail

getClassName

public java.lang.String getClassName()
Return the object's class name.


getName

public java.lang.String getName()
Return the object's name.


emitsLight

public boolean emitsLight()
Return whether the object emits light.


isLight

public boolean isLight()
Return whether the object is a lightsource.


isStatic

public boolean isStatic()
Return whether the object is static.


isFixed

public boolean isFixed()
Return whether the object is fixed.


isMassive

public boolean isMassive()
Return whether the object is massive.


isMovable

public boolean isMovable()
Return whether the object is movable.


moveBy

public void moveBy(double dx,
                   double dy)
Move the object by dx and dy, iff it is movable.


createGVectorObject

public GVectorObject createGVectorObject()
Create a GVectorObject.

Overrides:
createGVectorObject in class VectorObject